import request from '../utils/request'

export function login(username, password) {
  const data = {
    'auth_identify': username,
    'auth_password': password
  }
  return request({
    url: '/auth/admin',
    method: 'post',
    data: data
  })
}

export function logout() {
  return request({
    url: '/auth/logout',
    method: 'patch'
  })
}

export function getUserInfo() {
  return request({
    url: '/admin/detail',
    method: 'get'
  })
}

